﻿<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.efesco.common.UrlMap" %>
<%@ page import="com.efesco.system.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.lang.*" %>
<%@ page errorPage="/dorado/exception.d" %>
<%@ taglib uri="http://www.bstek.com/dorado" prefix="d" %>

<html>
<head>
<title></title>
<link href="<%=UrlMap.mapCssUrl("skin.css")%>" rel="stylesheet" type="text/css">
<jsp:include page="js/message.js"></jsp:include>
</head>
<body style="margin: 0; overflow: hidden" >
<%
User user=(User)session.getAttribute("User");
String ContextPath=request.getContextPath();
//System.out.println("-----"+ContextPath);
%> 
<%
  String nextPage=UrlMap.mapJspUrl("logout.jsp");
  
  GregorianCalendar dt=new GregorianCalendar();
  int iYear = dt.get(Calendar.YEAR);
  int iHour=dt.get(Calendar.HOUR_OF_DAY);
  int iMonth = dt.get(Calendar.MONTH)+1;
  int iDay = dt.get(Calendar.DAY_OF_MONTH);
  int iDayOfWeek=dt.get(Calendar.DAY_OF_WEEK);
  String theWeek="";
  //System.out.println("*****"+iDayOfWeek);
  switch (iDayOfWeek){
     case 1:theWeek="星期日";break;
     case 2:theWeek="星期一";break;
     case 3:theWeek="星期二";break;
     case 4:theWeek="星期三";break;
     case 5:theWeek="星期四";break;
     case 6:theWeek="星期五";break;
     case 7:theWeek="星期六";break;
  }
  
  String sYear = ""+iYear;
  String sMonth = iMonth+"";
  String sDay = iDay+"";
  String welcomeString=user.getRealName()+" ";
  if(iHour<6)
	welcomeString+="凌晨好";
  else if(iHour<9)
	welcomeString+="早上好";
  else if(iHour<12)
	welcomeString+="上午好";
  else if(iHour<14)
	welcomeString+="中午好";
  else if(iHour<17)
	welcomeString+="下午好";
  else if(iHour<19)
	welcomeString+="傍晚好";
  else welcomeString+="晚上好";
  
  welcomeString+="  ";
%>

<SCRIPT LANGUAGE="JavaScript">
<!--

urlContextPath='<%=ContextPath%>';
//alert(urlContextPath);
setTimeout('getResult()',30000);//30秒进行一次请求!
//-->
</SCRIPT> 

  <d:View config="com.efesco.main">
      <d:Layout type="border" padding="0">
      <d:Pane position="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="160" align="left"><div align="center"><img src="<%=UrlMap.mapImageUrl("logo_s.jpg")%>" width="54" height="66"></div></td> 
    <td width="150" height="83" align="left"><div align="center"><img src="<%=UrlMap.mapImageUrl("dot.gif")%>" width="8" height="8">&nbsp;&nbsp; <a href="<%=UrlMap.mapJspUrl("welcome.jsp")%>" class="font" target="main">返回首页</a></div></td>
    <td align="left" background="<%=UrlMap.mapImageUrl("tbg.jpg")%>"><table width="100%" height="83" border="0" align="right" cellpadding="0" cellspacing="0">
      <tr>
        <td width="27%">&nbsp;</td>
        <td width="69%" valign="bottom"><div align="right"><span class="Top"><a href="#" class="font"><%=welcomeString%><%=(sYear+"年"+sMonth+"月"+sDay+"日"+"  "+theWeek)%></a></span></div></td>
        <td width="4%">&nbsp;</td>
      </tr>
      <tr>
        <td ><img src="<%=UrlMap.mapImageUrl("dot.gif")%>" width="8" height="8">&nbsp;&nbsp; <a href="#" onclick="exit1()" class="font">退&nbsp;&nbsp;出</a></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td valign="top" class="Top"></td>
        <td width="12" valign="bottom" class="Top">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>      
        <d:MenuBar id="functionMenubar" />
      </d:Pane>
      <d:Pane position="center">
        <d:SplitPanel id="spiltpanel1" orientation="horizontal" position="160" width="100%" height="100%" padding="0">
          <d:SplitPanel id="spiltpanel2" orientation="vertical" position="75%" width="100%" height="100%" padding="0">
             <iframe id="frameToolsBar" src="jsp/toolsBar.jsp" name="toolsBar" frameborder="0" style="width: 100%; height: 100%" onload="hideCovering()"></iframe>
              <d:Splitter />
              <d:SubWindow id="windowDescription" title="Help Document" width="100%" height="100%" showMinimizeButton="false" showMaximizeButton="true" draggable="false" resizable="false">
                <iframe name="description" frameborder="0" style="width: 100%; height: 100%"></iframe>
              </d:SubWindow>
          </d:SplitPanel>
          <d:Splitter />              
            <d:SubWindow id="windowMain" title="Main" width="100%" height="100%" showMinimizeButton="false" showMaximizeButton="true" draggable="false" resizable="false">
              <div style="width: 100%; height: 100%; position: relative">
                <iframe id="frameMain" name="main" frameborder="0" style="width: 100%; height: 100%" src="jsp/welcome.jsp">123</iframe>
                <div id="frameCovering" style="left: 0; top: 0; width: 100%; height: 100%; position: absolute; background-color: white; padding: 12; display: none">
                  <table>
                    <tr>
                      <td><img src="<%=UrlMap.mapImageUrl("loading.gif")%>"></td>
                      <td><b>Loading...</b></td>
                    </tr>
                  </table>
                </div>
              </div>
            </d:SubWindow>
        </d:SplitPanel>
      </d:Pane>
    </d:Layout>
  </d:View>
</body>
<script language="javascript">
  function exit1(){
    top.location.href="<%=nextPage%>";
  }
</script>
</html>
